package org.ellwood.core.common.entity;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.ellwood.core.common.entity.socket.SocketBean;

import java.util.ArrayList;
import java.util.List;

/**
 * @ProjectName: ellwood-boot-pro
 * @PackageName: org.ellwood.core.common.entity
 * @ClassName: TransferMessage
 * @Description: // 传送消息 实体
 * @Author: Ellwood
 * @CreateDate: 2024/6/14 - 下午4:38
 * @Version: V1.0.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class TransferMessage {

    {
        toPushAll=false;
    }

    @Schema(description = "消息体bean")
    private SocketBean<?> message;

    @Schema(description = "消息接收人")
    private List<String> toUsers=new ArrayList<>();

    @Schema(description = "消息发送人")
    private String fromUser;

    @Schema(description = "是否通知全部用户")
    private boolean toPushAll;
}
